package com.gilgamesh.mall.order.controller;

import com.gilgamesh.mall.order.service.OrderUserService;
import com.gilgamesh.mall.sdk.bean.member.UserEntity;
import com.gilgamesh.mall.sdk.dto.ResponseDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanm
 * @date 2021/1/12 19:39
 **/
@RestController
@RequestMapping("api/order/user")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class OrderUserController {

    private final OrderUserService orderUserService;

    @PostMapping("add")
    public ResponseDTO<Integer> add(@RequestBody UserEntity user){
        return orderUserService.add(user);
    }
}
